<!--骨髓报告-->
<template>
  <div style="height:100%;overflow:hidden;">
    <div style="height:100%">
      <div style="position:absolute;top:7px;right:5px;z-index:100" v-if="this.marrowOptions.autoInputNumber == '1'">
        <div @click="ShowNumber()" class="el-button el-button--mini"
          style="height:20px;margin-left:2px;font-size:10px;padding:5px 14px">
          {{ showNUmberText }}
        </div>
      </div>
      <el-tabs @tab-click="handleMarrowTabClick" :before-leave="beforeLeave" style="height:100%;" type="border-card"
        ref="tabs">
        <el-tab-pane label="检验结果" id="tab-result">
          <div class="result-content">
            <div :style="{ height: '100%', width: this.tableResultWidth }">
              <div :style="{ height: 'calc(100% - ' + this.panelHeight + 'px)' }">
                <vxe-table :data.sync="tableDataResult1" @current-change="currentResultChangeEvent"
                  @cell-dblclick="DblEvent" @edit-actived="ResultActive" @edit-closed="ResultClose"
                  :sort-config="{ trigger: 'cell' }"
                  :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }"
                  :mouse-config="{ selected: true }" :select-config="selectConfig" :span-method="colspanMethod"
                  :cell-class-name="ColumnClassName" :height="h" resizable border show-overflow="tooltip"
                  highlight-current-row ref="xTableResult" show-header-overflow="tooltip" header-align="center"
                  :show-xscroll="xscrollflag" :loading="loadingResult" size="mini" align="center"
                  :loadCustomColumnData="loadNull" :width="w" :header-cell-class-name="headerCellClassName"
                  class="ResultTable">
                  <vxe-table-column show-header-overflow="tooltip" show-overflow="tooltip" :field="item.field" :title="item.field == 'result_str' ||
                      item.field == 'result1' ||
                      item.field == 'result4'
                      ? item.title + (showNumberFlag == '1' ? '' : '%')
                      : item.title
                    " :width="item.width" v-for="item in tableResultColumn" v-bind:key="item.field" align="center"
                    :edit-render="item.field == 'result_ref' ? null : { name: 'input', autoselect: true }
                      " header-align="center">
                    <template v-if="item.field == 'itemgroup'">
                      <vxe-table-column show-header-overflow="tooltip" show-overflow="tooltip" :field="itemcol.field"
                        :title="itemcol.title" :width="itemcol.width" v-for="itemcol in tableItemResultColumn"
                        v-bind:key="itemcol.field" :align="itemcol.field == 'mcname' ? 'center' : 'left'"
                        header-align="center" :edit-render="null
                          ">
                        <template v-slot:header="{ column }">
                          <div></div>
                        </template>
                      </vxe-table-column>
                    </template>

                    <template v-if="item.field == 'itemgroup2'">
                      <vxe-table-column show-header-overflow="tooltip" show-overflow="tooltip" :field="itemcol.field"
                        :title="itemcol.title" :width="itemcol.width" v-for="itemcol in tableItemResultColumn2"
                        v-bind:key="itemcol.field" align="center" header-align="center" :edit-render="itemcol.field == 'refstdev' || itemcol.field == 'refaverg'
                            ? null
                            : { name: 'input', autoselect: true }
                          ">
                        <template v-slot:edit="{ row, rowIndex }" v-if="itemcol.field == 'result_str' ||
                          itemcol.field == 'result1' ||
                          itemcol.field == 'result4'
                          ">
                          <el-input v-if="editflag" v-model="row[itemcol.field]" @keyup.down.native="
                            ResultMove(row, 1, rowIndex, [itemcol.field], 1)
                            " @keyup.up.native="
    ResultMove(row, 0, rowIndex, [itemcol.field], 1)
    " @keyup.enter.native="
    ResultMove(row, 2, rowIndex, [itemcol.field], 1)
    " class="marrow-input" style="width:100%;height:100%;"></el-input>
                          <span v-else>{{ row[itemcol.field] }}</span>
                        </template>
                        <template v-slot:header="{ column }"
                          v-if="itemcol.field == 'mcname' || itemcol.field == 'scname' || itemcol.field == 'rpt_itemname'">
                          <div style="height: 1px"></div>
                        </template>
                      </vxe-table-column>
                    </template>
                    <template v-slot:header="{ column }" v-if="item.field == 'itemgroup'">
                      <div :style="tableItemResultColumn2.length > 0 ? 'position:absolute;width:100%' : ''">{{ item.title }}
                      </div>
                    </template>
                    <template v-slot:header="{ column }" v-else-if="item.field == 'itemgroup2'">
                      <div style="border-bottom:1px solid #ccc">{{ item.title }}</div>
                    </template>
                    <template v-slot="{ row }" v-if="item.field == 'result_str' ||
                      item.field == 'result1' ||
                      item.field == 'result4'
                      ">
                      <div :style="ResultClass(row)">
                        <span v-if="Options.resultstrbold == '1'" style="font-weight:bold">{{
                          row[item.field]
                        }}</span>
                        <span v-else>{{ row[item.field] }}</span>
                      </div>
                    </template>
                    <template v-slot:edit="{ row, rowIndex }" v-if="item.field == 'result_str' ||
                      item.field == 'result1' ||
                      item.field == 'result4'
                      ">
                      <el-input v-if="editflag" v-model="row[item.field]"
                        @keyup.down.native="ResultMove(row, 1, rowIndex, [item.field], 1)"
                        @keyup.up.native="ResultMove(row, 0, rowIndex, [item.field], 1)"
                        @keyup.enter.native="ResultMove(row, 2, rowIndex, [item.field], 1)" class="marrow-input"
                        style="width:100%;height:100%;"></el-input>
                      <span v-else>{{ row[item.field] }}</span>
                    </template>
                    <template v-slot:edit="{ row }" v-else>
                      <span>{{ row[item.field] }}</span>
                    </template>
                  </vxe-table-column>
                </vxe-table>
              </div>
              <div :style="{ width: '100%', height: this.panelHeight - 5 + 'px' }">
                <vxe-table ref="xSummayTableResult" :data.sync="summayRows" :width="w" height="100%" size="mini"
                  :resizable="false" show-overflow="tooltip" :header-cell-class-name="summaryHeaderCellClassName"
                  :cell-class-name="summaryHeaderCellClassName" :loadCustomColumnData="loadNull" border>
                  <vxe-table-column show-overflow="tooltip" v-for="item in summayColumns" :field="item.field"
                    :title="item.title" :width="item.width" v-bind:key="item.field" align="center" header-align="center">
                    <template v-slot="{ row, columnIndex }">
                      <span>{{ row[item.field] == '' ? '' : (columnIndex != 0 ? row[item.field] + '个' : row[item.field]) }}</span>
                    </template>
                  </vxe-table-column>
                </vxe-table>
              </div>
            </div>
            <div v-if="this.rowNum > 0 && this.tableDataResult.length > this.rowNum"
              :style="{ height: '100%', width: this.textInfoWidth }">
              <vxe-table :data.sync="tableDataResult2" @current-change="currentResultChangeEvent"
                @cell-dblclick="DblEvent" @edit-actived="ResultActive" @edit-closed="ResultClose"
                :sort-config="{ trigger: 'cell' }"
                :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }"
                :mouse-config="{ selected: true }" :select-config="selectConfig" :span-method="colspanMethod"
                :cell-class-name="ColumnClassName" :height="h" resizable border show-overflow="tooltip"
                highlight-current-row ref="xTableResult2" show-header-overflow="tooltip" header-align="center"
                :show-xscroll="xscrollflag" :loading="loadingResult" size="mini" align="center"
                :loadCustomColumnData="loadNull" :width="w" :header-cell-class-name="headerCellClassName"
                class="ResultTable">
                <vxe-table-column show-header-overflow="tooltip" show-overflow="tooltip" :field="item.field" :title="item.field == 'result_str' || item.field == 'result1' || item.field == 'result4'
                    ? item.title + (showNumberFlag == '1' ? '' : '%')
                    : item.title
                  " :width="item.width" v-for="item in tableResultColumn" v-bind:key="item.field" align="center"
                  :edit-render="item.field == 'result_ref' ? null : { name: 'input', autoselect: true }
                    " header-align="center">
                  <template v-if="item.field == 'itemgroup'">
                    <vxe-table-column show-header-overflow="tooltip" show-overflow="tooltip" :field="itemcol.field"
                      :title="itemcol.title" :width="itemcol.width" v-for="itemcol in tableItemResultColumn"
                      v-bind:key="itemcol.field" :align="itemcol.field == 'mcname' ? 'center' : 'left'"
                      header-align="center" :edit-render="null
                        ">
                      <template v-slot:header="{ }">
                        <div></div>
                      </template>
                    </vxe-table-column>
                  </template>
                  <template v-if="item.field == 'itemgroup2'">
                    <vxe-table-column show-header-overflow="tooltip" show-overflow="tooltip" :field="itemcol.field"
                      :title="itemcol.title" :width="itemcol.width" v-for="itemcol in tableItemResultColumn2"
                      v-bind:key="itemcol.field" align="center" header-align="center" :edit-render="itemcol.field == 'refstdev' || itemcol.field == 'refaverg'
                          ? null
                          : { name: 'input', autoselect: true }
                        ">
                      <template v-slot:edit="{ row, rowIndex }" v-if="itemcol.field == 'result_str' ||
                        itemcol.field == 'result1' ||
                        itemcol.field == 'result4'
                        ">
                        <el-input v-if="editflag" v-model="row[itemcol.field]" @keyup.down.native="
                          ResultMove(row, 1, rowIndex, [itemcol.field], 2)
                          " @keyup.up.native="ResultMove(row, 0, rowIndex, [itemcol.field], 2)" @keyup.enter.native="
    ResultMove(row, 2, rowIndex, [itemcol.field], 2)
    " class="marrow-input" style="width:100%;height:100%;"></el-input>
                        <span v-else>{{ row[itemcol.field] }}</span>
                      </template>
                    </vxe-table-column>
                  </template>
                  <template v-slot:header="{ column }" v-if="item.field == 'itemgroup'">
                    <div :style="tableItemResultColumn2.length > 0 ? 'position:absolute;width:100%' : ''">{{ item.title }}
                    </div>
                  </template>
                  <template v-slot:header="{ column }" v-else-if="item.field == 'itemgroup2'">
                    <div style="border-bottom:1px solid #ccc">{{ item.title }}</div>
                  </template>
                  <template v-slot="{ row }" v-if="item.field == 'result_str' ||
                    item.field == 'result1' ||
                    item.field == 'result4'
                    ">
                    <div :style="ResultClass(row)">
                      <span v-if="Options.resultstrbold == '1'" style="font-weight:bold">{{
                        row[item.field]
                      }}</span>
                      <span v-else>{{ row[item.field] }}</span>
                    </div>
                  </template>
                  <template v-slot:edit="{ row, rowIndex }" v-if="item.field == 'result_str' ||
                    item.field == 'result1' ||
                    item.field == 'result4'
                    ">
                    <el-input v-if="editflag" v-model="row[item.field]"
                      @keyup.down.native="ResultMove(row, 1, rowIndex, [item.field], 2)"
                      @keyup.up.native="ResultMove(row, 0, rowIndex, [item.field], 2)"
                      @keyup.enter.native="ResultMove(row, 2, rowIndex, [item.field], 2)" class="marrow-input"
                      style="width:100%;height:100%;"></el-input>
                    <span v-else>{{ row[item.field] }}</span>
                  </template>
                  <template v-slot:edit="{ row }" v-else>
                    <span>{{ row[item.field] }}</span>
                  </template>
                </vxe-table-column>
              </vxe-table>
            </div>
            <div v-else v-show="this.showTableTextInfo" :style="{ height: '100%', width: this.textInfoWidth }">
              <table style="width:100%;height:100%">
                <tr>
                  <td style="text-align:left;font-size:12px;height:20px;font-weight:bold">
                    分析/特征
                  </td>
                </tr>
                <tr>
                  <td>
                    <el-input type="textarea" :rows="19" resize="none" class="el-textarea__inner"
                      :readonly="this.editflag ? false : true" style="height:100%;width:100%;padding:0 0 0 0px"
                      :maxlength="4095" v-model="txtinfo1" @dblclick.native="inputdblEvent()"></el-input>
                  </td>
                </tr>
                <tr>
                  <td style="text-align:left;font-size:12px;height:20px;font-weight:bold">结论</td>
                </tr>
                <tr>
                  <td>
                    <el-input type="textarea" :rows="18" resize="none" class="el-textarea__inner"
                      :readonly="this.editflag ? false : true" style="height:100%;width:100%;padding:0 0 0 0px"
                      :maxlength="4095" v-model="txtinfo2" @dblclick.native="inputdblEvent()"></el-input>
                  </td>
                </tr>
              </table>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="分析 /特征和结论" id="tab-result2">
        </el-tab-pane>
      </el-tabs>
    </div>
    <rm-floatwindow v-rm-drag-window :visible="dialogAdvicefloatwindowVisible" :isMarrow="true"
       :winStyle="floatwindowstyle3"  title="分析 /特征和结论" @close="FloatClose($event, '2')">
      <div style="margin:5px 5px 10px 5px;">
        <span style="font-size:18px;font-weight:bold;">分析 /特征</span>
        <table style="width:100%;border-spacing:0px;margin-top:5px;height: 100%">
          <tr>
            <td style="margin:5px 5px 10px 5px;">
              <el-input type="textarea" :rows="7" v-model="txtinfo1" style="width:300px;"></el-input>
            </td>
            <td>
              <div style="margin-left:5px;">
                快速查找
                <el-input v-model="advicesearchtxtFloat" @input="AdviceSearchFloat" placeholder="请输入要查找的信息"
                  style="width:calc(100% - 60px)"></el-input>
              </div>
              <div style="margin:5px 5px;height:160px;">
                <vxe-table :data="tableDataAdvice" :loading="loadingAdvice" @cell-click="AdviceFloatClick"
                  @cell-dblclick="AdviceFloatdblClick" height="auto" highlight-current-row highlight-hover-row resizable
                  highlight-hover-column border show-header-overflow="tooltip" show-overflow="tooltip"
                  header-align="center" size="mini" stripe width="auto">
                  <vxe-table-column field="txttitle" title="标题" width="100px"></vxe-table-column>
                  <vxe-table-column field="txtinfo" title="文字描述" width="160px"></vxe-table-column>
                  <vxe-table-column field="seq" title="序号" width="80px"></vxe-table-column>
                  <vxe-table-column field="inputcode" title="输入码" width="80px"></vxe-table-column>
                </vxe-table>
              </div>
              <div style="margin:5px 5px;">
                <el-checkbox v-model="appendChangeRowFloat" style="display:block">追加时自动换行</el-checkbox>
              </div>
            </td>
          </tr>
        </table>
      </div>
      <div style="margin:5px 5px 10px 5px;height:160px;">
        <span style="font-size:18px;font-weight:bold;">结论</span>
        <table style="width:100%;border-spacing:0px;margin-top:5px;height: 100%">
          <tr>
            <td style="margin:5px 5px;">
              <el-input type="textarea" :rows="7" v-model="txtinfo2" style="width:300px;"></el-input>
            </td>
            <td>
              <div style="margin-left:5px;">
                快速查找
                <el-input v-model="advicesearchtxtFloat" @input="AdviceSearchFloat2" placeholder="请输入要查找的信息"
                  style="width:calc(100% - 60px)"></el-input>
              </div>
              <div style="margin:5px 5px;">
                <vxe-table :data="tableDataAdvice2" :loading="loadingAdvice2" @cell-click="AdviceFloatClick2"
                  @cell-dblclick="AdviceFloatdblClick2" height="auto" highlight-current-row highlight-hover-row resizable
                  highlight-hover-column border show-header-overflow="tooltip" show-overflow="tooltip"
                  header-align="center" size="mini" stripe width="auto">
                  <vxe-table-column field="txttitle" title="标题" width="100px"></vxe-table-column>
                  <vxe-table-column field="txtinfo" title="文字描述" width="160px"></vxe-table-column>
                  <vxe-table-column field="seq" title="序号" width="80px"></vxe-table-column>
                  <vxe-table-column field="inputcode" title="输入码" width="80px"></vxe-table-column>
                </vxe-table>
              </div>
              <div style="margin:5px 5px;">
                <el-checkbox v-model="appendChangeRowFloat2" style="display:block">追加时自动换行</el-checkbox>
              </div>
            </td>
          </tr>
          <tr>
            <td width="200">
              <div>
                <span style="color:blue;">说明: 单击为追加 双击为替换</span>
              </div>
            </td>
          </tr>
        </table>
      </div>
    </rm-floatwindow>
  </div>
</template>
<script>
import { Promise } from "q";
import XE from "xe-utils";
import elementResizeDetectorMaker from "element-resize-detector";

export default {
  props: ["PatientInfo", "rptunitid", "pOptions", "h", "w"],
  name: "LIS313",
  data() {
    return {
      DelIndex: -1,
      myrptunitid: this.rptunitid,
      tableDataResult: [],
      tableDataResult1: [],
      tableDataResult2: [],
      rowNum: 0,
      tableNullDataResult: [],
      tableItemResultColumn: [],
      tableItemResultColumn2: [],
      tableResultColumn: [],
      loadingResult: false,
      InputMsg: [],
      selectConfig: { tigger: "row" },
      keyConfig: {
        isDel: true,
        isTab: true,
        isEdit: true
      },
      xscrollflag: true,
      editflag: true,
      Options: this.pOptions,
      marrowOptions: {},
      Refreshflag: false,
      panelHeight: 0,
      summayColumns: [],
      summayRows: [],
      customArrays: {},
      txtinfo1: "",
      txtinfo2: "",
      showNumberFlag: "0",
      showNUmberText: "显示比例",
      tableResultWidth: "100%",
      tableResultMinWidth: 500,
      showTableTextInfo: false,
      textInfoWidth: "100%",
      lastCellValue: "",
      //检验意见悬浮窗
      dialogAdvicefloatwindowVisible: false, //检验意见浮动窗口显示标志
      loadingAdvice: false,
      loadingAdvice2: false,
      tableDataAdvice: [],
      tableDataAdvice2: [],
      floatwindowstyle3: "top:5px;left:calc(20% + 40px );width:800px;height:550px", //检验意见浮动窗口回传样式
      advicesearchtxtFloat: "", //检验意见浮动窗口关键词查询
      advicesearchtxtFloat2: "", //检验意见浮动窗口关键词查询
      appendChangeRowFloat: false, //检验意见浮动窗口追加行标志
      appendChangeRowFloat2: false, //检验意见浮动窗口追加行标志
      tableDataAdviceAll: [],
      tableDataAdviceAll2: [],
      result2total: 0,//保存时有效血片总个数
      result3total: 0,//保存时有效髓片总个数
      result5total: 0,//保存时有效印片总个数
    };
  },
  components: {},
  created() {
    this.InitPageData();
  },
  mounted() {
    // 监听body上的点击
    document.querySelector("body").addEventListener("click", this.closeMenu);

    const _this = this;
    const erd = elementResizeDetectorMaker();
    erd.listenTo(document.getElementById("tab-result"), element => {
      _this.$nextTick(() => {
        if (this.rowNum > 0 && this.tableDataResult.length > this.rowNum) {
          this.tableResultWidth = "400px";
          this.textInfoWidth = "400px";
        } else {
          //console.log(element.offsetWidth);
          if (element.offsetWidth > this.tableResultMinWidth + 150) {
            this.showTableTextInfo = true;
            this.tableResultWidth = this.tableResultMinWidth + "px";
            this.textInfoWidth = element.offsetWidth - this.tableResultMinWidth + "px";
            //this.$refs.tabs.$children[2].$el.style.display = 'none';
          } else {
            this.showTableTextInfo = false;
            this.tableResultWidth = "100%";
            this.textInfoWidth = "100%";
            //this.$refs.tabs.$children[2].$el.style.display = 'inline-block';
          }
        }
      });
    });
  },
  beforeDestroy() {
    // 移除监听
    document.querySelector("body").removeEventListener("click", this.closeMenu);
  },
  updated() { },
  methods: {
    InitPageData() {
      //this.tableHeight=parseInt(this.h) - this.panelHeight;
      //console.log(this.tableHeight,this.h,this.panelHeight);
    },
    QueryAdvice(infotype) {
      this.$tool
        .request({
          url: "LIS/LIS3/LIS310",
          method: "post",
          data: {
            action: "getrptunittxtinfo",
            rptunitid: this.rptunitid,
            infotype: infotype
          }
        })
        .then(res => {
          if (!res.hasOwnProperty("errcode")) {
            if (infotype == "1") {
              this.tableDataAdviceAll = XE.clone(res, true);
              this.tableDataAdvice = res;
              //this.dialogAdvicefloatwindowVisible = true;
            }
            if (infotype == "2") {
              this.tableDataAdviceAll2 = XE.clone(res, true);
              this.tableDataAdvice2 = res;
              //this.dialogAdvicefloatwindowVisible = true;
            }
          }
        });
    },
    AdviceFloatClick({ row }) {
      if (this.txtinfo1) {
        if (this.txtinfo1.indexOf(row.txtinfo) == -1) {
          if (this.appendChangeRowFloat) {
            this.txtinfo1 += "\n" + row.txtinfo;
          } else {
            if (this.txtinfo1) {
              this.txtinfo1 += "," + row.txtinfo;
            } else {
              this.txtinfo1 += row.txtinfo;
            }
          }
        }
      } else {
        this.txtinfo1 = row.txtinfo;
      }
    },
    AdviceFloatClick2({ row }) {
      if (this.txtinfo2) {
        if (this.txtinfo2.indexOf(row.txtinfo) == -1) {
          if (this.appendChangeRowFloat2) {
            this.txtinfo2 += "\n" + row.txtinfo;
          } else {
            if (this.txtinfo2) {
              this.txtinfo2 += "," + row.txtinfo;
            } else {
              this.txtinfo2 += row.txtinfo;
            }
          }
        }
      } else {
        this.txtinfo2 = row.txtinfo;
      }
    },
    //保存前操作
    beforeSaveReport() {
      if (!this.editflag) return;
      if (this.marrowOptions.autoInputNumber == "1") {
        for (let i = 0; i < this.tableDataResult.length; i++) {
          //0:都计算，1:都不计算，2:只计算髓片，3:只计算血片
          let row = this.tableDataResult[i];
          if (row.notsumflag == "1") {
            row.result_str = 0;
            row.result1 = 0;
            row.result4 = 0;
          } else {
            if (this.result2total > 0 && (row.notsumflag == "0" || row.notsumflag == "3")) {
              let r = parseFloat(row.result2);
              if (!isNaN(r) && r > 0) {
                row.result_str = Math.floor((r * 100) / this.result2total);
              }
            }
            if (this.result3total > 0 && (row.notsumflag == "0" || row.notsumflag == "2")) {
              let r = parseFloat(row.result3);
              if (!isNaN(r) && r > 0) {
                row.result1 = Math.floor((r * 100) / this.result3total);
              }
            }
            if (this.result5total > 0 && row.notsumflag == "0") {
              let r = parseFloat(row.result5);
              if (!isNaN(r) && r > 0) {
                row.result4 = Math.floor((r * 100) / this.result5total);
              }
            }
          }

        }
      } else if (this.marrowOptions.showpercentcol == "1") {//显示百分比列就要自动计算到百分比列上去
        for (let i = 0; i < this.tableDataResult.length; i++) {
          //0:都计算，1:都不计算，2:只计算髓片，3:只计算血片
          let row = this.tableDataResult[i];
          if (row.notsumflag == "1") continue;
          if (this.result2total > 0 && (row.notsumflag == "0" || row.notsumflag == "3")) {
            let r = parseFloat(row.result_str);
            if (!isNaN(r) && r > 0) {
              row.result2 = ((r * 100) / this.result2total).toFixed(1);
            }
          }
          if (this.result3total > 0 && (row.notsumflag == "0" || row.notsumflag == "2")) {
            let r = parseFloat(row.result1);
            if (!isNaN(r) && r > 0) {
              row.result3 = ((r * 100) / this.result3total).toFixed(1);
            }
          }
          if (this.result5total > 0 && row.notsumflag == "0") {
            let r = parseFloat(row.result4);
            if (!isNaN(r) && r > 0) {
              row.result5 = ((r * 100) / this.result5total).toFixed(1);
            }
          }
        }
      }
    },

    handleMarrowTabClick(tab, event) {
      if (tab.label == "分析 /特征和结论" && this.dialogAdvicefloatwindowVisible == false) {
        this.inputdblEvent();
      }
    },

    beforeLeave(a, b) {
      if (a != 0) return false;
    },
    //上方按钮功能

    //表格功能
    //单元格修改事件
    currentResultChangeEvent({ row }) {
      //console.log(row);
    },
    loadNull() {
      return [];
    },
    //单元格样式
    ColumnClassName({ seq, row, rowIndex, $rowIndex, column }) {
      if (column.property != "result1" && column.property != "result_str" && column.property != "result4" && column.property != "rpt_itemname") {
        return "disabled-cell paddingcolumn";
        // return "disabled-cell";
      }
    },
    headerCellClassName({ seq, row, rowIndex, $rowIndex, column }) {
      if (column.property == "mcname" || column.property == "scname") {
        return "border-none";
      }
      if (column.property == "itemgroup") {
        //return "itemgroup";
      }
    },
    //进入编辑模式
    ResultActive({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, cell }) {
      if (!this.editflag) return;
      if (column.property == "result_str") {
        this.lastCellValue = row.result_str;
      } else if (column.property == "result1") {
        this.lastCellValue = row.result1;
      } else if (column.property == "result4") {
        this.lastCellValue = row.result4;
      }
    },
    //离开编辑模式
    ResultClose({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, cell }) {
      if (!this.editflag) return;

      //console.log(row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, cell);

      if (this.marrowOptions.autoInputNumber == "1" || this.marrowOptions.showpercentcol != "1") {
        if (column.property == "result_str") {
          if (this.lastCellValue != row.result_str) {
            row.result2 = row.result_str;
          }
        } else if (column.property == "result1") {
          if (this.lastCellValue != row.result1) {
            row.result3 = row.result1;
          }
        } else if (column.property == "result4") {
          if (this.lastCellValue != row.result4) {
            row.result5 = row.result4;
          }
        }
      }

      this.getSummayDatas();
    },
    ResultClass(row) {
      var stylestr = "padding:0 3px;";

      return stylestr;
    },
    //单元格编辑框上下键事件
    //type 1下，0上，2回车
    ResultMove(row, type, index, coltype, tablenum) {
      //console.log(row, type, index, coltype);
      if (tablenum == 1) {
        if (type == 1) {
          //下
          if (index < this.$refs.xTableResult.tableFullData.length - 1) {
            var row = this.$refs.xTableResult.tableFullData[index + 1];
            this.$refs.xTableResult.setCurrentRow(row);
            if (coltype == "result1") {
              //骨髓片
              this.$refs.xTableResult.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              //印片
              this.$refs.xTableResult.setActiveCell(row, "result4");
            } else {
              //血片
              this.$refs.xTableResult.setActiveCell(row, "result_str");
            }
          }
          else {
            var row = this.$refs.xTableResult2.tableFullData[0];
            this.$refs.xTableResult2.setCurrentRow(row);
            if (coltype == "result1") {
              //骨髓片
              this.$refs.xTableResult2.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              //印片
              this.$refs.xTableResult2.setActiveCell(row, "result4");
            } else {
              //血片
              this.$refs.xTableResult2.setActiveCell(row, "result_str");
            }
          }
        } else if (type == 0) {
          //上
          if (index != 0) {
            var row = this.$refs.xTableResult.tableFullData[index - 1];
            this.$refs.xTableResult.setCurrentRow(row);
            if (coltype == "result1") {
              this.$refs.xTableResult.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              this.$refs.xTableResult.setActiveCell(row, "result4");
            } else {
              this.$refs.xTableResult.setActiveCell(row, "result_str");
            }
          }
        } else {
          //回车
          // if ((coltype == "result1" && this.marrowOptions.showYP != "1") || coltype == "result4") {
          //     if (index < this.$refs.xTableResult.tableFullData.length - 1) {
          //         var row = this.$refs.xTableResult.tableFullData[index + 1];
          //         this.$refs.xTableResult.setCurrentRow(row);
          //         this.$refs.xTableResult.setActiveCell(row, "result_str");
          //     }
          // } else if (coltype == "result1") {
          //     this.$refs.xTableResult.setActiveCell(row, "result4");
          // } else {
          //     this.$refs.xTableResult.setActiveCell(row, "result1");
          // }
          if (index < this.$refs.xTableResult.tableFullData.length - 1) {
            var row = this.$refs.xTableResult.tableFullData[index + 1];
            this.$refs.xTableResult.setCurrentRow(row);
            if (coltype == "result1") {
              //骨髓片
              this.$refs.xTableResult.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              //印片
              this.$refs.xTableResult.setActiveCell(row, "result4");
            } else {
              //血片
              this.$refs.xTableResult.setActiveCell(row, "result_str");
            }
          }
          else {
            var row = this.$refs.xTableResult2.tableFullData[0];
            this.$refs.xTableResult2.setCurrentRow(row);
            if (coltype == "result1") {
              //骨髓片
              this.$refs.xTableResult2.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              //印片
              this.$refs.xTableResult2.setActiveCell(row, "result4");
            } else {
              //血片
              this.$refs.xTableResult2.setActiveCell(row, "result_str");
            }
          }

        }
      } else {
        if (type == 1) {
          //下
          if (index < this.$refs.xTableResult2.tableFullData.length - 1) {
            var row = this.$refs.xTableResult2.tableFullData[index + 1];
            this.$refs.xTableResult2.setCurrentRow(row);
            if (coltype == "result1") {
              //骨髓片
              this.$refs.xTableResult2.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              //印片
              this.$refs.xTableResult2.setActiveCell(row, "result4");
            } else {
              //血片
              this.$refs.xTableResult2.setActiveCell(row, "result_str");
            }
          }
        } else if (type == 0) {
          //上
          if (index != 0) {
            var row = this.$refs.xTableResult2.tableFullData[index - 1];
            this.$refs.xTableResult2.setCurrentRow(row);
            if (coltype == "result1") {
              this.$refs.xTableResult2.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              this.$refs.xTableResult2.setActiveCell(row, "result4");
            } else {
              this.$refs.xTableResult2.setActiveCell(row, "result_str");
            }
          }
          else {
            var row = this.$refs.xTableResult.tableFullData[this.$refs.xTableResult.tableFullData.length - 1];
            this.$refs.xTableResult.setCurrentRow(row);
            if (coltype == "result1") {
              this.$refs.xTableResult.setActiveCell(row, "result1");
            } else if (coltype == "result4") {
              this.$refs.xTableResult.setActiveCell(row, "result4");
            } else {
              this.$refs.xTableResult.setActiveCell(row, "result_str");
            }
          }
        } else {
          //回车
          // if ((coltype == "result1" && this.marrowOptions.showYP != "1") || coltype == "result4") {
          //     if (index < this.$refs.xTableResult2.tableFullData.length - 1) {
          //         var row = this.$refs.xTableResult2.tableFullData[index + 1];
          //         this.$refs.xTableResult2.setCurrentRow(row);
          //         this.$refs.xTableResult2.setActiveCell(row, "result_str");
          //     }
          // } else if (coltype == "result1") {
          //     this.$refs.xTableResult2.setActiveCell(row, "result4");
          // } else {
          //     this.$refs.xTableResult2.setActiveCell(row, "result1");
          // }
          var row = this.$refs.xTableResult2.tableFullData[index + 1];
          this.$refs.xTableResult2.setCurrentRow(row);
          if (coltype == "result1") {
            //骨髓片
            this.$refs.xTableResult2.setActiveCell(row, "result1");
          } else if (coltype == "result4") {
            //印片
            this.$refs.xTableResult2.setActiveCell(row, "result4");
          } else {
            //血片
            this.$refs.xTableResult2.setActiveCell(row, "result_str");
          }
        }
      }
    },
    //单元格双击事件
    DblEvent({ row, rowIndex, $rowIndex, column }) {
      if (!this.editflag) return;
      switch (column.property) {
        case "result_str":
          break;
      }
    },
    //单元格合并
    colspanMethod({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, data }) {
      let colspan = 1;
      let rowspan = 1;

      if (column.property == "itemgroup") rowspan = 2;
      //console.log(rowIndex,row)
      if (column.property == "mcname") {
        rowspan = parseInt(row.mcrowspan);
        colspan = parseInt(row.mccolspan);

        if (rowspan != 1 || colspan != 1) {
          return { rowspan: rowspan, colspan: colspan };
        }
      } else if (column.property == "scname") {
        rowspan = parseInt(row.scrowspan);
        colspan = parseInt(row.sccolspan);
        if (rowspan != 1 || colspan != 1) {
          return { rowspan: rowspan, colspan: colspan };
        }
      } else if (column.property == "rpt_itemname") {
        if (row.itcolspan == 0) {
          return { rowspan: 0, colspan: 0 };
        }
      }
    },
    summaryHeaderCellClassName() {
      return "summary-background";
    },
    //刷新系统设置
    RefreshOptions(p) {
      this.Options = p;
      //console.log("option",p);
      this.tableResultColumn = this.Options.rCols;

      this.marrowOptions = this.Options.marrowOptions;
      this.tableItemResultColumn = this.marrowOptions.itemCols;
      this.tableItemResultColumn2 = this.marrowOptions.itemCols2;

      this.tableNullDataResult = this.marrowOptions.nullDdatas.Data;
      this.tableDataResult = [];
      for (let i = 0; i < this.tableNullDataResult.length; i++) {
        this.tableDataResult.push(JSON.parse(JSON.stringify(this.tableNullDataResult[i])));
      }
      //console.log(this.tableNullDataResult, this.tableDataResult);
      this.tableResultMinWidth = this.marrowOptions.tableResultWidth;
      this.summayColumns = this.marrowOptions.summaryCols;
      this.summayRows = this.marrowOptions.summayRows.Data;
      this.customArrays = this.marrowOptions.customArray;
      // console.log(this.tableItemResultColumn);
      if (this.marrowOptions.showYP == "1") {
        this.panelHeight = 120;
      } else {
        this.panelHeight = 100;
      }
      this.showNumberFlag = "1";
      if (this.marrowOptions.autoInputNumber == "1") {
        this.showNUmberText = "显示比例";
      }

      this.getSummayDatas();
    },
    //清空结果数据
    ClearTableDate() {
      return new Promise((s, f) => {
        this.tableDataResult = [];
        for (let i = 0; i < this.tableNullDataResult.length; i++) {
          this.tableDataResult.push(JSON.parse(JSON.stringify(this.tableNullDataResult[i])));
        }

        if (this.marrowOptions.autoInputNumber == "1") {
          this.showNumberFlag = "1";
          this.showNUmberText = "显示比例";
        }

        this.txtinfo1 = "";
        this.txtinfo2 = "";
        this.getSummayDatas();
        this.editflag = true;
        s();
      });
    },
    //提取结果
    QueryResult(rptinfo) {
      return Promise((s, f) => {
        this.Refreshflag = true;
        let reportid = rptinfo.reportid;
        //console.log(rptinfo,reportid);
        if (rptinfo.rechkflag == "9" || (this.Options.onlymodifymyreport == "1" && $tool.getSession(this.$tool.loginuserno) != rptinfo["report_user"])) {
          this.editflag = false;
        } else {
          this.editflag = true;
        }
        this.$tool
          .request({
            url: "LIS/LIS3/LIS313",
            method: "post",
            data: {
              action: "queryresultlist",
              reportid: reportid,
              rptunitid: this.myrptunitid
            }
          })
          .then(res => {
            console.log("data", res);
            this.rowNum = res.rowNum;
            this.tableDataResult = res.vxtab.Data;
            if (this.rowNum > 0 && this.tableDataResult.length > this.rowNum) {
              this.tableDataResult1 = res.vxtab.Data.slice(0, this.rowNum);
              this.tableDataResult2 = res.vxtab.Data.slice(this.rowNum);
            } else {
              this.tableDataResult1 = res.vxtab.Data;
            }
            console.log("tableDataResult1", this.tableDataResult1);
            console.log("tableDataResult2", this.tableDataResult2);
            //this.tableDataResult = res.marrowOption.Item1.nullDdatas.Data;
            //this.tableItemResultColumn = res.marrowOption.Item1.itemCols;
            this.loadingResult = false;
            this.Refreshflag = false;
            if (res.rptinfo) {
              this.txtinfo1 = res.rptinfo.txtinfo1;
              this.txtinfo2 = res.rptinfo.txtinfo2;
            } else {
              this.txtinfo1 = "";
              this.txtinfo2 = "";
            }
            if (this.marrowOptions.autoInputNumber == "1") {
              this.showNumberFlag = "0";
              this.showNUmberText = "显示细胞数";
            }
            this.getSummayDatas();
            var returndata = { res: res.rptinfo, redo: "", history: 0 };
            s(returndata);
          })
          .catch(error => {
            this.$message.error("错误:" + error);
            this.Refreshflag = false;
            f();
          });
      });
    },
    getSummayDatas() {
      let rowX = this.summayRows[0];
      let rowG = this.summayRows[1];
      let rowY = this.marrowOptions.showYP == "1" ? this.summayRows[2] : {};

      // let cols=[];
      // for(let i=0;i<this.summayColumns.length;i++){
      //     if(this.summayColumns[i].field!='item'){
      //         rowX[this.summayColumns[i].field]=0;
      //         rowG[this.summayColumns[i].field]=0;
      //         if(this.marrowOptions.showYP=='1'){
      //             rowY[this.summayColumns[i].field]=0;
      //         }
      //         cols.push(this.summayColumns[i].field);
      //     }
      // }

      //console.log(cols,this.summayRows);
      let xDatas = {};
      let sDatas = {};
      let yDatas = {};
      let sumX = 0;
      let sumY = 0;
      let sumS = 0;

      for (let i = 0; i < this.tableDataResult.length; i++) {
        let row = this.tableDataResult[i];
        let result2 = 0;
        let result3 = 0;
        let result5 = 0;
        if (this.marrowOptions.autoInputNumber != "1" && this.marrowOptions.showpercentcol == "1") {
          result2 = parseFloat(row.result_str);
          result3 = parseFloat(row.result1);
          result5 = parseFloat(row.result4);
        } else {
          result2 = parseFloat(row.result2);
          result3 = parseFloat(row.result3);
          result5 = parseFloat(row.result5);
        }


        if (isNaN(result2)) {
          result2 = 0;
        }

        if (isNaN(result3)) {
          result3 = 0;
        }

        if (isNaN(result5)) {
          result5 = 0;
        }

        let item = "I_" + row.rpt_itemcode;

        xDatas[item] = result2;
        sDatas[item] = result3;
        if (this.marrowOptions.showYP == "1") {
          yDatas[item] = result5;
        }
        //0:都计算，1:都不计算，2:只计算髓片，3:只计算血片
        if (row.notsumflag == "1") continue;
        if (row.notsumflag == "0" || row.notsumflag == "3")
          sumX += result2;
        if (row.notsumflag == "0" || row.notsumflag == "2")
          sumS += result3;
        if (row.notsumflag == "0")
          sumY += result5;

        if (row.marrowclass != "" && row.marrowclass != null) {
          item = "D_" + row.marrowclass;
          if (row.notsumflag == "0" || row.notsumflag == "3")
            if (xDatas.hasOwnProperty(item)) {
              xDatas[item] += result2;
            } else {
              xDatas[item] = result2;
            }
          if (row.notsumflag == "0" || row.notsumflag == "2")
            if (sDatas.hasOwnProperty(item)) {
              sDatas[item] += result3;
            } else {
              sDatas[item] = result3;
            }
          if (row.notsumflag == "0")
            if (this.marrowOptions.showYP == "1") {
              if (yDatas.hasOwnProperty(item)) {
                yDatas[item] += result5;
              } else {
                yDatas[item] = result5;
              }
            }
        }
        if (row.marrowsubclass != "" && row.marrowsubclass != null) {
          item = "S_" + row.marrowsubclass;
          if (row.notsumflag == "0" || row.notsumflag == "3")
            if (xDatas.hasOwnProperty(item)) {
              xDatas[item] += result2;
            } else {
              xDatas[item] = result2;
            }
          if (row.notsumflag == "0" || row.notsumflag == "2")
            if (sDatas.hasOwnProperty(item)) {
              sDatas[item] += result3;
            } else {
              sDatas[item] = result3;
            }
          if (row.notsumflag == "0")
            if (this.marrowOptions.showYP == "1") {
              if (yDatas.hasOwnProperty(item)) {
                yDatas[item] += result5;
              } else {
                yDatas[item] = result5;
              }
            }
        }
      }

      //遍历
      //console.log(xDatas,sDatas,yDatas);
      if (!isNaN(sumX) && sumX != 0 && isFinite(sumX)) {
        rowX["summary"] = parseFloat(sumX.toFixed(12));
      } else {
        rowX["summary"] = "";
      }
      if (!isNaN(sumS) && sumS != 0 && isFinite(sumS)) {
        rowG["summary"] = parseFloat(sumS.toFixed(12));
      } else {
        rowG["summary"] = "";
      }
      if (this.marrowOptions.showYP == "1") {
        if (!isNaN(sumY) && sumY != 0 && isFinite(sumY)) {
          rowY["summary"] = parseFloat(sumY.toFixed(12));
        } else {
          rowY["summary"] = "";
        }
      }
      this.result2total = rowX["summary"];//血片有效个数
      this.result3total = rowG["summary"];//骨髓有效个数
      this.result5total = rowY["summary"];//印片有效个数

      for (let key in this.customArrays) {
        let formula = this.customArrays[key];
        let a = formula.split(":");

        if (a[0].indexOf("X") >= 0) {
          let s = 0;
          let f = a[1];
          for (let k in xDatas) {
            let re = new RegExp("\\[" + k + "\\]", "g");

            f = f.replace(re, xDatas[k]);
          }
          //console.log(f,a[1]);

          try {
            s = eval(f);
            if (!isNaN(s) && s != 0 && isFinite(s)) {
              rowX[key] = parseFloat(eval(s).toFixed(12));
            } else {
              rowX[key] = "";
            }
          } catch (_) {
            console.log(_);
          }
        }
        if (a[0].indexOf("S") >= 0) {
          let s = 0;
          let f = a[1];
          for (let k in sDatas) {
            let re = new RegExp("\\[" + k + "\\]", "g");

            f = f.replace(re, sDatas[k]);
          }

          try {
            s = eval(f);
            if (!isNaN(s) && s != 0 && isFinite(s)) {
              rowG[key] = parseFloat(eval(s).toFixed(12));
            } else {
              rowG[key] = "";
            }
          } catch (_) {
            console.log(_);
          }
        }
        if (this.marrowOptions.showYP == "1" && a[0].indexOf("Y") >= 0) {
          let s = 0;
          let f = a[1];
          for (let k in yDatas) {
            let re = new RegExp("\\[" + k + "\\]", "g");

            f = f.replace(re, yDatas[k]);
          }

          try {
            s = eval(f);
            if (!isNaN(s) && s != 0 && isFinite(s)) {
              rowY[key] = parseFloat(eval(s).toFixed(12));
            } else {
              rowY[key] = "";
            }
          } catch (_) {
            console.log(_);
          }
        }
      }
      this.$refs.xSummayTableResult.loadData(this.summayRows);
    },
    ShowNumber() {
      if (this.showNumberFlag == "1") {
        this.showNUmberText = "显示细胞数";
        this.showNumberFlag = "0";
        let sumX = 0;
        let sumY = 0;
        let sumS = 0;
        for (let i = 0; i < this.tableDataResult.length; i++) {
          let x = parseFloat(this.tableDataResult[i].result_str);
          let s = parseFloat(this.tableDataResult[i].result1);
          let y = parseFloat(this.tableDataResult[i].result4);

          if (x > 0) {
            sumX += x;
          }
          if (s > 0) {
            sumS += s;
          }
          if (y > 0) {
            sumY += y;
          }
        }
        //console.log(sumX,sumY,sumS);
        for (let i = 0; i < this.tableDataResult.length; i++) {
          if (sumX > 0) {
            let r = parseFloat(this.tableDataResult[i].result_str);
            if (r > 0) {
              this.tableDataResult[i].result_str = Math.floor((r * 100) / sumX);
            }
          }
          if (sumS > 0) {
            let r = parseFloat(this.tableDataResult[i].result1);
            if (r > 0) {
              this.tableDataResult[i].result1 = Math.floor((r * 100) / sumS);
            }
          }
          if (sumY > 0) {
            let r = parseFloat(this.tableDataResult[i].result4);
            if (r > 0) {
              this.tableDataResult[i].result4 = Math.floor((r * 100) / sumY);
            }
          }
        }
      } else {
        this.showNUmberText = "显示比例";
        this.showNumberFlag = "1";
        for (let i = 0; i < this.tableDataResult.length; i++) {
          if (this.tableDataResult[i].result2 != "") {
            this.tableDataResult[i].result_str = this.tableDataResult[i].result2;
          }
          if (this.tableDataResult[i].result3 != "") {
            this.tableDataResult[i].result1 = this.tableDataResult[i].result3;
          }
          if (this.tableDataResult[i].result5 != "") {
            this.tableDataResult[i].result4 = this.tableDataResult[i].result5;
          }
        }
      }

      if (!this.editflag) {
        this.$refs.xTableResult.loadData(this.tableDataResult);
        this.$refs.xTableResult2.loadData(this.tableDataResult2);
      }
      this.getSummayDatas();
    },
    //input输入框双击事件
    inputdblEvent(colcode) {
      this.QueryAdvice(1);
      this.QueryAdvice(2);
      if (localStorage.getItem("floatwindowstyle3")) this.floatwindowstyle3 = localStorage.getItem("floatwindowstyle3");
      this.dialogAdvicefloatwindowVisible = true;
    },
    AdviceSearchFloat(value) {
      if (value) {
        this.tableDataAdvice = this.tableDataAdviceAll.filter(item => item.txttitle.toUpperCase().indexOf(value.toUpperCase()) > -1 || item.txtinfo.toUpperCase().indexOf(value.toUpperCase()) > -1 || item.inputcode.toUpperCase().indexOf(value.toUpperCase()) > -1);
      } else {
        this.tableDataAdvice = XE.clone(this.tableDataAdviceAll, true);
      }
    },
    AdviceSearchFloat2(value) {
      if (value) {
        this.tableDataAdvice2 = this.tableDataAdviceAll2.filter(item => item.txttitle.toUpperCase().indexOf(value.toUpperCase()) > -1 || item.txtinfo.toUpperCase().indexOf(value.toUpperCase()) > -1 || item.inputcode.toUpperCase().indexOf(value.toUpperCase()) > -1);
      } else {
        this.tableDataAdvice2 = XE.clone(this.tableDataAdviceAll2, true);
      }
    },
    AdviceFloatdblClick({ row }) {
      this.txtinfo1 = row.txtinfo;
    },
    AdviceFloatdblClick2({ row }) {
      this.txtinfo2 = row.txtinfo;
    },
    FloatClose(style, type) {
      if (type == "2") {
        this.dialogAdvicefloatwindowVisible = false;
        this.floatwindowstyle3 = style.cssText;
        localStorage.setItem("floatwindowstyle3", this.floatwindowstyle3);
      } else {
        this.dialogAdvicefloatwindowVisible = false;
        this.floatwindowstyle3 = style.cssText;
        localStorage.setItem("floatwindowstyle3", this.floatwindowstyle3);
      }
    }
  },
  watch: {
    rptunitid(val) {
      this.myrptunitid = val;
    }
  }
};
</script>

<style scoped>
::v-deep .disabled-cell {
  background-color: #f7f7f7;
}

::v-deep .warn-high {
  background-color: #ffc0c0;
}

::v-deep .warn-low {
  background-color: #c0c0ff;
}

::v-deep .danger {
  background-color: #ff0000;
}

::v-deep .paddingcolumn {
  padding: 0 3px;
}

::v-deep .el-image {
  z-index: 2007;
}

::v-deep .vxe-table--body .vxe-body--row .marrow-input .el-input__inner {
  height: 24px !important;
  line-height: 24px !important;
  text-align: center;
  font-size: 16px;
}

::v-deep .middle-left .el-checkbox__input.is-checked+.el-checkbox__label {
  color: red;
}

::v-deep .dialogdanger .el-textarea.is-disabled .el-textarea__inner {
  color: red;
}

::v-deep .border-none {
  visibility: hidden;
  /* display: none; */
}

::v-deep .itemgroup {
  height: 50px;
  background-color: red;
}

.menu_style {
  position: absolute;
  width: 150px;
  background-color: #fff;
  border-radius: 2px;
  box-shadow: 2px 2px 14px #d0d0d0;
  z-index: 2008;
}

.menu_style>ul>li {
  text-indent: 25px;
  height: 38px;
  line-height: 38px;
  border-bottom: 1px dashed #f0f0f0;
  cursor: pointer;
}

.menu_style>ul>li:hover {
  background: #e0eeff;
}

.dangerPatInfo tr td:nth-child(even) {
  width: 40px;
  border-bottom: 1px solid black;
}

table tr td:nth-child(odd) {
  text-align: right;
  white-space: nowrap;
}

table tr td:nth-child(even) {
  text-align: left;
}

table tr td:nth-child(1) {
  width: 80px;
}

::v-deep .vxe-table .vxe-cell {
  padding: 0;
}

::v-deep .paddingcolumn .vxe-cell {
  padding: 0 3px;
  white-space: normal !important;
  width: 100% !important;
}

.el_main {
  padding: 0 0;
}

::v-deep .summary-background {
  background: #f5f5f5;
}

::v-deep .vxe-table .vxe-body--row.row--current td {
  font-weight: bold;
  font-size: 10px;
  background-color: #fff;
}

::v-deep .vxe-table .vxe-body--row.row--current .disabled-cell {
  background-color: #f7f7f7;
}

.result-content {
  display: flex;
  height: 100%;
}

.result-content table {
  height: 100%;
}

.el-tab-pane {
  overflow-x: auto;
}

::v-deep .ResultTable .vxe-table--body td {
  height: 18px !important;
}</style>
